Skip to content

Conversation

@eregon
Copy link
Member

@eregon eregon commented Nov 20, 2025

  • It would use the SDK suite version, which does not match if BOOTSTRAP_GRAALVM is set.

* It would use the SDK suite version, which does not match if BOOTSTRAP_GRAALVM is set.
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 20, 2025
@gilles-duboscq
Copy link
Member

It's a bit unclear to me what version org.graalvm.version refers to.
This PR seems to assume it's the version of native image (including JIT compiler and truffle support).
But polyglot and truffle also seem to think it's their version although when using a bootstrap vm that wouldn't work.

@chumer, should PolyglotEngineImpl#getVersion stop using HomeFinder.getInstance().getVersion() and use META-INF/graalvm/org.graalvm.truffle/version or META-INF/graalvm/org.graalvm.polyglot/version instead?

@chumer
Copy link
Member

chumer commented Nov 20, 2025

@chumer, should PolyglotEngineImpl#getVersion stop using HomeFinder.getInstance().getVersion() and use META-INF/graalvm/org.graalvm.truffle/version or META-INF/graalvm/org.graalvm.polyglot/version instead?

Yes I think it should. We didn't get to cleaning this up yet. I also want to fully eliminate the HomeFinder. Happy to take contributions.

@eregon
Copy link
Member Author

eregon commented Nov 20, 2025

It's a bit unclear to me what version org.graalvm.version refers to.

From the name of property it seems rather clear it's the GraalVM version (legacy-style), as you say Native Image & Compiler version.
There is also the GRAALVM/release file which has e.g. GRAALVM_VERSION="25.0.1", which HomeFinder reads if the property is not already set, so that's further indication that the meaning of org.graalvm.version is the GraalVM version.

Could we merge this as a first step since it seems clearly a bug fix?

  • For the case where GraalVM and Truffle versions match it doesn't matter.
  • For the case they don't match, it reported the wrong version and now reports the right version.

should PolyglotEngineImpl#getVersion stop using HomeFinder.getInstance().getVersion() and use META-INF/graalvm/org.graalvm.truffle/version or META-INF/graalvm/org.graalvm.polyglot/version instead?

I can take a look at that, sounds easy enough.

I also want to fully eliminate the HomeFinder.

I'm not interested in doing that cleanup though.

@gilles-duboscq
Copy link
Member

I agree we can make truffle use its own version as a follow-up. I'll integrate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants